(Fx_store_cut_buffer_internal): Handle empty string right.
authorRichard M. Stallman <rms@gnu.org>
Fri, 4 Jun 1993 05:32:31 +0000 (05:32 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 4 Jun 1993 05:32:31 +0000 (05:32 +0000)
src/xselect.c

index 293029a042f1e8196db59f96664b07eb910dda41..28438af226af8e8f5c90f992c49bcc89acc2381b 100644 (file)
@@ -1795,6 +1795,12 @@ DEFUN ("x-store-cut-buffer-internal", Fx_store_cut_buffer_internal,
   if (! cut_buffers_initialized) initialize_cut_buffers (display, window);
 
   BLOCK_INPUT;
+
+  /* Don't mess up with an empty value.  */
+  if (!bytes_remaining)
+    XChangeProperty (display, window, buffer_atom, XA_STRING, 8,
+                    PropModeReplace, data, 0);
+
   while (bytes_remaining)
     {
       int chunk = (bytes_remaining < max_bytes